package com.liang.mapper;


import com.liang.pojo.Excuse;
import com.liang.pojo.dto.ExcuseDto;
import org.apache.ibatis.annotations.Param;
import java.util.HashMap;
import java.util.List;
/**
 *@作者:lsk
 *DAO接口
 *@Date:2023/10/22
*/
public interface ExcuseDAO<T,P> extends MyBaseMapperLSK<T,P>{

	/**
	根据Excuse_id查询
	*/
	public Excuse selectByExcuse_id(@Param("excuse_id") Long excuse_id);

	/**
	根据Excuse_id更新
	*/
	public Integer updateByExcuse_id(@Param("bean") T t);

	/**
	根据Excuse_id删除
	*/
	public Integer deleteByExcuse_id(@Param("excuse_id") Long excuse_id);



	/**
	 insertlsk:(插入)
	*/
	public Integer insertlsk(@Param("bean") T t);


	/**
	 insertOrUpdatelsk(插入或更新(根据主键或唯一索引更新，主键和唯一索引不会改变))
	*/
	public Integer insertOrUpdatelsk(@Param("bean") T t);


	/**
	 insertBathlsk:(批量插入)
	*/
	public Integer insertBatchlsk(@Param("list") List<T> list);


	/**
	 insertOrUpdateBatchlsk:(批量插入或更新)
	*/
	public Integer insertOrUpdateBatchlsk(@Param("list") List<T> list);


	/**
	 selectListlsk:(根据参数查询集合)
	*/
	public List<T> selectListlsk(@Param("query") P p);


	/**
	 selectCount:(根据集合查询数量)
	*/
	public Long selectCountlsk(@Param("query") P p);

	/**
	 * 设置excuse_state字段值
	 * @param excuse_id
	 * @param excuse_state
	 */
    void setExcuseState(@Param("excuse_id") Long excuse_id, @Param("excuse_state") int excuse_state);

    List<ExcuseDto> approveExcuseList(HashMap<String, Object> selectMap);

	Integer approveExcuseListCounts(HashMap<String, Object> selectMap);

	List<ExcuseDto> approvingExcuseList(@Param("userid") Long userid);

	Integer approvingExcuseListCounts(@Param("userid") Long userid);

    List<ExcuseDto> approvedExcuseList(ExcuseDto excuseDto);

	Integer approvedExcuseListCounts(ExcuseDto excuseDto);


	List<ExcuseDto> getDeletingExcuseList(HashMap<String, Object> selectContmap);

	List<ExcuseDto> willDeleteExcuse(ExcuseDto excuseDto);
}